<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<title></title>
<link href="../shortcut_icon_1.png" rel="shortcut icon"
	type="image/x-icon" />
<link href="../Content/flick/jquery-ui-1.10.3.custom.css"
	rel="stylesheet" />

<link href="../Content/site.css" rel="stylesheet" />
<link href="../Content/main.css" rel="stylesheet" />
<script src="../Scripts/jquery-1.10.1.js"></script>
<script src="../Scripts/jquery-ui-1.10.3.custom.js"></script>

<script src="../Scripts/utility.js"></script>
<script>
	loadTimeout();// this function to control loading
</script>

<script>
$(document).ajaxError(function(event,xhr,options,exc){
    alert("事件名-----" + event.type + "\n"
         +"状态码-----" + xhr.status + "\n"
         +"请求源-----" + options.url + "\n"
         +"描述是-----" + exc + "\n");
  });

	$(function() {
		

		var MyUrl = $("#urltext").val();

		var MyData = new Array();

		MyData[$("#Name1").val()] = $("#var1").val();

		MyData[$("#Name2").val()] = $("#var2").val();

		$("#runButton").click(function() {

			$.ajax({
				url:"http://www.webservicex.net/globalweather.asmx/GetWeather",

				//url : "http://spitfire-project.eu:8182/ld4s/ov",
				//url:"http://localhost:8182/ld4s/ov",
				data : {
					"values" : [ [ "12.4", "21.9", "88.7", "24.5" ] ],
					"start_range" : [ "5800" ],
					"end_range" : [ "10321" ]
				},
				dataType : "html",
				type : "post",
				success : function(data) {
					alert("success");

					$("#result").html(data);
				},
				error : function(XmlHttpRequest, textStatus, errorThrown) {
					alert(XmlHttpRequest.status);
					if (XmlHttpRequest.status == 200) {
						var errorstr = XmlHttpRequest.responseText;
						alert(errorstr);
					}
				},
			});

		});

	});
</script>


</head>
<body>
	<div>
		<p>in this page I will try to make function here can work with all
			the webservice in the world ,if it is possible.</p>
	</div>


	<table width="100%">
		<tr>
			<td>web service URL:</td>
			<td><input type="text" width=100% id="urltext"></td>

		</tr>
		<tr>
			<td>Name1:<input type="text" id="Name1">
			</td>
			<td>var1:<input type="text" id="var1"></td>
		</tr>
		<tr>
			<td>Name2:<input type="text" id="Name2">
			</td>
			<td>var2:<input type="text" id="var2"></td>
		</tr>
	</table>

	<input type="button" id="runButton" value="run">


	<div id="result">here will show the result.</div>


</body>
</html>
